<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增支付商支付类型')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payerPayType-add">
			<div class="form-group">
				<label class="col-sm-3 control-label">支付商：</label>
				<div class="col-sm-8">
					<select style="width: 100%;height: 36px; border: 1px solid #ddd;" name="payerId">
						<option value=""></option>
						<option th:each="payer:${payers}" th:value="${payer.userId}" th:text="${payer.userName}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">支付类型编码：</label>
				<div class="col-sm-8">
					<input id="payType" name="payType" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">支付类型名称：</label>
				<div class="col-sm-8">
					<input id="payLabel" name="payLabel" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">最小金额：</label>
				<div class="col-sm-8">
					<input id="minAmount" type="number" name="minAmount" class="form-control" value="0">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">最大金额：</label>
				<div class="col-sm-8">
					<input id="maxAmount" type="number" name="maxAmount" class="form-control" value="50000">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">预充值费率：</label>
				<div class="col-sm-8">
					<input id="depositRate" type="number" name="depositRate" class="form-control" value="-1">
					<div>注: -1表示不需要预充值</div>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "channel/payerPayType"
		$("#form-payerPayType-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-payerPayType-add').serialize());
	        }
	    }
	</script>
</body>
</html>
